<template>
  <div class="base-info">
    <div class="left">
      <img v-lazy="baseInfo.img" alt="" />
    </div>
    <div class="base_wrap">
      <div class="base_content">
        <div class="right">
          <h3>
            <el-tag v-if="baseInfo.tags">歌单</el-tag>
            {{ baseInfo.name }}
          </h3>
          <div class="right-item avator_wrap">
            <img class="avator" :src="baseInfo.creatorAvatar" alt="" />
            <span>{{ baseInfo.creatorName }}</span>
            <span
              >创建时间：{{
                new Date(baseInfo.createTime).toLocaleString()
              }}</span
            >
          </div>
          <div class="right-item">
            <el-button round type="danger" icon="el-icon-video-camera"
              >播放全部</el-button
            >
            <el-button icon="el-icon-s-claim"
              >收藏（{{ baseInfo.subscribedCount }}）</el-button
            >
            <el-button icon="el-icon-share"
              >分享（{{ baseInfo.shareCount }}）</el-button
            >
          </div>
        </div>
        <div class="right_end">
          <div>
            <p>歌曲数</p>
            <p>{{ baseInfo.trackCount }}</p>
          </div>
          <div>
            <p>播放数</p>
            <p>{{ parseInt(baseInfo.playCount / 10000) + '万' }}</p>
          </div>
        </div>
      </div>
      <div class="base_bottom">
        <p>
          标签：<a href="" v-for="(item, index) in baseInfo.tags" :key="item"
            >{{ item }}{{ index == baseInfo.tags.length - 1 ? '' : '/' }}
          </a>
        </p>
        <div>
          {{ baseInfo.title }}
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    baseInfo: {
      type: Object,
      default: {}
    }
  }
}
</script>
<style lang="less" scoped>
.base-info {
  width: 100%;
  display: flex;
  height: 300px;
  padding: 20px 30px;
  // flex-wrap: wrap;
}
.right {
  flex: 1;
  margin-left: 20px;
  justify-content: space-between;
}
.base_content {
  flex: 1;
  width: 800px;
  justify-content: space-between;
  display: flex;
}
.right_end {
  display: flex;
  div {
    height: 80px;
    width: 90px;
    text-align: center;
    &:nth-child(1) {
      border-right: 1px solid #e5e5e5;
    }
  }
}
.left {
  width: 200px;
  height: 200px;
  img {
    width: 200px;
    height: 200px;
  }
}
.right-item {
  height: 50px;
  line-height: 50px;
}
.base_bottom {
  margin-left: 23px;
  p {
    line-height: 30px;
  }
  div {
    line-height: 30px;
  }
}
.avator {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 20px;
  margin-top: 10px;
}
.avator_wrap {
  display: flex;
}
</style>
